﻿using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using System;
using System.Collections.Generic;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WpfDemo.Common;

namespace WpfDemo.ViewModel
{
    public partial class BaseViewModel: ObservableObject
    {
        /// <summary>
        /// 总页数
        /// </summary>
        [ObservableProperty]
        public PageInfo pageInfo =new();     

        public void GetPageData<T>(List<T> _list, System.Collections.ObjectModel.ObservableCollection<T> target)
        {
            if (_list != null)
            {
                _list.ForEach(arg =>
                {
                    target.Add(arg);
                });
            }
        }

        ////
        //[RelayCommand]
        //public virtual bool userPermission(object obj)
        //{
        //    return true;
        //}

    }
}
